<?php
/**
 * The main template file.
 *
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package zsuper_mayi
 */
get_header(); ?>

<!--内容开始-->
<div class="content_wrap clear">
<!--左侧内容开始-->
  <div class="content fl">
    <p class="publish">最新发布</p>
    <?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
  		<article id="post-<?php the_ID(); ?>" <?php post_class('clear'); ?>>
      		<div id="post-<?php the_ID(); ?>" class="img">
        		<a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title(); ?>">
        			<?php if ( has_post_thumbnail() ) : ?>
	 					<?php the_post_thumbnail( array(220,150) ); ?>
					<?php else: ?>
						<img src="<?php bloginfo('template_directory' ); ?>/image/article.png" alt="<?php the_title(); ?>">
					<?php endif; ?>
				</a>
      		</div>
      			<div class="text">
        			<h3><a href="<?php esc_url(the_permalink()); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
        			<span>
        				<?php
						the_excerpt( sprintf(
							/* translators: %s: Name of current post. */
							wp_kses( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'zsuper_mayi' ), array( 'span' => array( 'class' => array() ) ) ),
							the_title( '<span class="screen-reader-text">"', '"</span>', false )
							) );

							wp_link_pages( array(
							'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'zsuper_mayi' ),
							'after'  => '</div>',
						) );
						?>
					</span>
          			<?php zsuper_mayi_mate() ?>
      		</div>
    	</article>
	<?php endwhile; ?>
	<?php else: ?>
	<!--  如果没有数据则显示什么  -->
	<?php endif; ?>
    <!-- 分页开始 -->
    <div class="page">
      <?php if(function_exists('zsuper_paging_nav')) zsuper_paging_nav(); ?>
</div>
    <!-- 分页结束 -->
</div>
  <?php get_sidebar( ); ?>
</div>
<!--内容结束-->
<?php get_footer( );

